let express = require('express')
let app = express()

app.use((req, res, next) => {
    res.header('Access-Control-Allow-Origin', '*');
    if (req.method === 'OPTIONS') {
        return res.send()
    }
    next()
})

app.get('/getTresList', (req, res) => {
    res.json({
        code: 0,
        parent: [
            { name: 'james', id: 2 }
        ]
    })
})

app.listen(3433)